package com.exam.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.exam.entity.Product;
import com.exam.mapper.ProductMapper;
import com.exam.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenzhuo
 * @since 2023-02-04 05:24:05
 */
@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    ProductService productService;
    @RequestMapping("/all")
    public Page<Product> product(Integer currentPage, Integer pageSize,String keyword){
        Page<Product> productPage = productService.getPageProduct(currentPage,pageSize,keyword);
//        List<Book> records = bookPage.getRecords();
        return productPage;
    }


}

